home *** CD-ROM | disk | FTP | other *** search
Wrap
Text File | 1995-08-10 | 11.0 KB | 255 lines | [ TEXT/MPS ]
(* File: Balloons.mod Contains: Balloon Help Package Interfaces. Version: Technology: System 7.5 Package: Universal Interfaces 2.0 in “MPW Latest” on ETO #17 Copyright: © 1984-1995 by Apple Computer, Inc. All rights reserved. Bugs?: If you find a problem with this file, use the Apple Bug Reporter stack. Include the file and version information (from above) in the problem description and send to: Internet: apple.bugs.applelink.apple.com AppleLink: APPLE.BUGS *) (*$TAGS-*) (*$CALLING PASCAL*) MODULE Balloons; IMPORT SYSTEM, Types, Quickdraw, Menus, TextEdit; (* $PUSH*) (* $ALIGN MAC68K*) (* $LibExport+*) CONST hmBalloonHelpVersion* = $0002; (* The real version of the Help Manager *) kHMHelpMenuID* = -16490; (* Resource AIFF.ID and menu AIFF.ID of help menu *) kHMAboutHelpItem* = 1; (* help menu item number of About Balloon Help… *) kHMShowBalloonsItem* = 3; (* help menu item number of Show/Hide Balloons *) kHMHelpID* = -5696; (* AIFF.ID of various Help Mgr package resources (in Pack14 range) *) kBalloonWDEFID* = 126; (* Resource AIFF.ID of the WDEF proc used in standard balloons *) (* Dialog item template type constant *) helpItem* = 1; (* key value in DITL template that corresponds to the help item *) (* Options for Help Manager resources in LONG("hmnu"), LONG("hdlg"), LONG("hrct"), LONG("hovr"), & LONG("hfdr") resources *) hmDefaultOptions* = 0; (* default options for help manager resources *) hmUseSubID* = 1; (* treat resID's in resources as subID's of driver base AIFF.ID (for Desk Accessories) *) hmAbsoluteCoords* = 2; (* ignore window port origin and treat rectangles as absolute coords (local to window) *) hmSaveBitsNoWindow* = 4; (* don't create a window, just blast bits on screen. No update event is generated *) hmSaveBitsWindow* = 8; (* create a window, but restore bits behind window when window goes away & generate update event *) hmMatchInTitle* = 16; (* for hwin resources, match string anywhere in window title string *) (* Constants for Help Types in LONG("hmnu"), LONG("hdlg"), LONG("hrct"), LONG("hovr"), & LONG("hfdr") resources *) kHMStringItem* = 1; (* pstring used in resource *) kHMPictItem* = 2; (* LONG("PICT") ResID used in resource *) kHMStringResItem* = 3; (* LONG("STR#") ResID & index used in resource *) kHMTEResItem* = 6; (* Styled Text Edit ResID used in resource (LONG("TEXT") & LONG("styl")) *) kHMSTRResItem* = 7; (* LONG("STR ") ResID used in resource *) kHMSkipItem* = 256; (* don't display a balloon *) kHMCompareItem* = 512; (* Compare pstring in menu item w/ PString in resource item (LONG("hmnu") only) *) kHMNamedResourceItem* = 1024; (* Use pstring in menu item to get LONG("STR#"), LONG("PICT"), or LONG("STR ") resource (LONG("hmnu") only) *) kHMTrackCntlItem* = 2048; (* Reserved *) (* Constants for hmmHelpType's when filling out HMMessageRecord *) khmmString* = 1; (* help message contains a PString *) khmmPict* = 2; (* help message contains a resource AIFF.ID to a LONG("PICT") resource *) khmmStringRes* = 3; (* help message contains a res AIFF.ID & index to a LONG("STR#") resource *) khmmTEHandle* = 4; (* help message contains a Text Edit handle *) khmmPictHandle* = 5; (* help message contains a Quickdraw.Picture handle *) khmmTERes* = 6; (* help message contains a res AIFF.ID to LONG("TEXT") & LONG("styl") resources *) khmmSTRRes* = 7; (* help message contains a res AIFF.ID to a LONG("STR ") resource *) kHMEnabledItem* = 0; (* item is enabled, but not checked or control value* = 0 *) (* ResTypes for Styled TE Handles in Resources *) kHMTETextResType* = LONG("TEXT"); (* Resource Type of text data for styled TE record w/o style info *) kHMTEStyleResType* = LONG("styl"); kHMDisabledItem* = 1; (* item is disabled, grayed in menus or disabled in dialogs *) kHMCheckedItem* = 2; (* item is enabled, and checked or control value* = 1 *) kHMOtherItem* = 3; (* item is enabled, and control value > 1 *) (* Method parameters to pass to HMShowBalloon *) kHMRegularWindow* = 0; (* Create a regular window floating above all windows *) kHMSaveBitsNoWindow* = 1; (* Just save the bits and draw (for MDEF calls) *) kHMSaveBitsWindow* = 2; (* Regular window, save bits behind, AND generate update event *) (* Resource Types for whichType parameter used when extracting LONG("hmnu") & LONG("hdlg") messages *) kHMMenuResType* = LONG("hmnu"); (* Types.ResType of help resource for supporting menus *) kHMDialogResType* = LONG("hdlg"); (* Types.ResType of help resource for supporting dialogs *) kHMWindListResType* = LONG("hwin"); (* Types.ResType of help resource for supporting windows *) kHMRectListResType* = LONG("hrct"); (* Types.ResType of help resource for rectangles in windows *) kHMOverrideResType* = LONG("hovr"); (* Types.ResType of help resource for overriding system balloons *) kHMFinderApplResType* = LONG("hfdr"); TYPE HMStringResType* = RECORD hmmResID*: INTEGER; hmmIndex*: INTEGER; END; HMMessageRecord* = RECORD hmmHelpType*: Types.SInt16; (*ΔΔ CASE INTEGER OF 0: ( *) END; HMStringRecPtr* = POINTER TO HMStringRec; HMStringRec* = RECORD(HMMessageRecord) hmmString*: Types.Str255; (*ΔΔ ); 1: ( *) END; HMPictRecPtr* = POINTER TO HMPictRec; HMPictRec* = RECORD(HMMessageRecord) hmmPict*: Types.SInt16; (*ΔΔ ); 2: ( *) END; HMTEHandleRecPtr* = POINTER TO HMTEHandleRec; HMTEHandleRec* = RECORD(HMMessageRecord) hmmTEHandle*: TextEdit.TEHandle; (*ΔΔ ); 3: ( *) END; HMStringResRecPtr* = POINTER TO HMStringResRec; HMStringResRec* = RECORD(HMMessageRecord) hmmStringRes*: HMStringResType; (*ΔΔ ); 4: ( *) END; HMPictResRecPtr* = POINTER TO HMStringResRec; HMPictResRec* = RECORD(HMMessageRecord) hmmPictRes*: Types.SInt16; (*ΔΔ ); 5: ( *) END; HMPictHandleRecPtr* = POINTER TO HMPictHandleRec; HMPictHandleRec* = RECORD(HMMessageRecord) hmmPictHandle*: Quickdraw.PicHandle; (*ΔΔ ); 6: ( *) END; HMTEResRecPtr* = POINTER TO HMTEResRec; HMTEResRec* = RECORD(HMMessageRecord) hmmTERes*: Types.SInt16; (*ΔΔ ); 7: ( *) END; HMSTRResRecPtr* = POINTER TO HMSTRResRec; HMSTRResRec* = RECORD(HMMessageRecord) hmmSTRRes*: Types.SInt16; (*ΔΔ );*) END; HMMessageRecPtr* = POINTER TO HMMessageRecord; TipFunctionProcPtr* = (*ΔΔ Types.ProcPtr;*) PROCEDURE (tip: Types.Point; structure: Quickdraw.RgnHandle; VAR r: Types.Rect; VAR balloonVariant: INTEGER): Types.OSErr; TipFunctionUPP* = Types.UniversalProcPtr; CONST uppTipFunctionProcInfo* = $00003FE0; (* PROCEDURE (4 byte param, 4 byte param, 4 byte param, 4 byte param): 2 byte result; *) PROCEDURE NewTipFunctionProc*(userRoutine: TipFunctionProcPtr): TipFunctionUPP; (*$IF NOT GENERATINGCFM *) INLINE PASCAL $2E9F; (*$END*) PROCEDURE CallTipFunctionProc*(tip: Types.Point; structure: Quickdraw.RgnHandle; VAR r: Types.Rect; VAR balloonVariant: INTEGER; userRoutine: TipFunctionUPP): Types.OSErr; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $205F, $4E90; (*$END*) (* Public Interfaces *) PROCEDURE HMGetHelpMenuHandle*(VAR mh: Menus.MenuHandle): Types.OSErr; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $303C, $0200, $A830; (*$END*) PROCEDURE HMShowBalloon*((*CONST*)VAR aHelpMsg: HMMessageRecord; tip: Types.Point; alternateRect: Types.RectPtr; tipProc: TipFunctionUPP; theProc: Types.SInt16; balloonVariant: Types.SInt16; method: Types.SInt16): Types.OSErr; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $303C, $0B01, $A830; (*$END*) PROCEDURE HMRemoveBalloon*(): Types.OSErr; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $303C, $0002, $A830; (*$END*) PROCEDURE HMGetBalloons*(): BOOLEAN; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $303C, $0003, $A830; (*$END*) PROCEDURE HMSetBalloons*(flag: BOOLEAN): Types.OSErr; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $303C, $0104, $A830; (*$END*) PROCEDURE HMShowMenuBalloon*(itemNum: Types.SInt16; itemMenuID: Types.SInt16; itemFlags: Types.SInt32; itemReserved: Types.SInt32; tip: Types.Point; alternateRect: Types.RectPtr; tipProc: TipFunctionUPP; theProc: Types.SInt16; balloonVariant: Types.SInt16): Types.OSErr; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $303C, $0E05, $A830; (*$END*) PROCEDURE HMGetIndHelpMsg*(whichType: Types.ResType; whichResID: Types.SInt16; whichMsg: Types.SInt16; whichState: Types.SInt16; VAR options: Types.UInt32; VAR tip: Types.Point; VAR altRect: Types.Rect; VAR theProc: Types.SInt16; VAR balloonVariant: Types.SInt16; VAR aHelpMsg: HMMessageRecord; VAR count: Types.SInt16): Types.OSErr; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $303C, $1306, $A830; (*$END*) PROCEDURE HMIsBalloon*(): BOOLEAN; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $303C, $0007, $A830; (*$END*) PROCEDURE HMSetFont*(font: Types.SInt16): Types.OSErr; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $303C, $0108, $A830; (*$END*) PROCEDURE HMSetFontSize*(fontSize: Types.UInt16): Types.OSErr; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $303C, $0109, $A830; (*$END*) PROCEDURE HMGetFont*(VAR font: Types.SInt16): Types.OSErr; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $303C, $020A, $A830; (*$END*) PROCEDURE HMGetFontSize*(VAR fontSize: Types.UInt16): Types.OSErr; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $303C, $020B, $A830; (*$END*) PROCEDURE HMSetDialogResID*(resID: Types.SInt16): Types.OSErr; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $303C, $010C, $A830; (*$END*) PROCEDURE HMSetMenuResID*(menuID: Types.SInt16; resID: Types.SInt16): Types.OSErr; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $303C, $020D, $A830; (*$END*) PROCEDURE HMBalloonRect*((*CONST*)VAR aHelpMsg: HMMessageRecord; VAR coolRect: Types.Rect): Types.OSErr; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $303C, $040E, $A830; (*$END*) PROCEDURE HMBalloonPict*((*CONST*)VAR aHelpMsg: HMMessageRecord; VAR coolPict: Quickdraw.PicHandle): Types.OSErr; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $303C, $040F, $A830; (*$END*) PROCEDURE HMScanTemplateItems*(whichID: Types.SInt16; whichResFile: Types.SInt16; whichType: Types.ResType): Types.OSErr; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $303C, $0410, $A830; (*$END*) PROCEDURE HMExtractHelpMsg*(whichType: Types.ResType; whichResID: Types.SInt16; whichMsg: Types.SInt16; whichState: Types.SInt16; VAR aHelpMsg: HMMessageRecord): Types.OSErr; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $303C, $0711, $A830; (*$END*) PROCEDURE HMGetDialogResID*(VAR resID: Types.SInt16): Types.OSErr; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $303C, $0213, $A830; (*$END*) PROCEDURE HMGetMenuResID*(menuID: Types.SInt16; VAR resID: Types.SInt16): Types.OSErr; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $303C, $0314, $A830; (*$END*) PROCEDURE HMGetBalloonWindow*(VAR window: Quickdraw.WindowRef): Types.OSErr; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $303C, $0215, $A830; (*$END*) (* $ALIGN RESET*) (* $POP*) END Balloons.